package main

import (
	"fmt"
	"runtime"
	"time"
)

/*
   Author: mahaiyuan
   Date: 2021/5/29 11:42 上午
   Description:
*/
func main() {
	runtime.GOMAXPROCS(2)
	go a()
	go b()
	time.Sleep(1 * time.Second)
}

func a() {
	for i := 0; i < 20; i++ {
		//time.Sleep(100 * time.Millisecond)
		fmt.Println("A:", i)
	}
}
func b() {
	for i := 0; i < 20; i++ {
		//time.Sleep(100 * time.Millisecond)
		fmt.Println("B:", i)
	}
}